Package com.cisco.pt.ipc.sim
Interface Directory
- All Known Subinterfaces:
FileSystem
- All Known Implementing Classes:
DirectoryImpl,FileSystemImpl
Information provided by the PKI file:
\class Directory
\brief Directory is the directory of the file systems for routers and switches.
\example network().getDevice("Router0").getProcess("FileManager").getFileSystem("flash:")
- Author:
- Auto-generated
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddDirectory(String name, boolean bCheckPermission) Information provided by the PKI file:booleanaddHttpPage(String name, String content, boolean bCheckPermission) Information provided by the PKI file:booleanaddTextFile(String name, String content, boolean bCheckPermission) Information provided by the PKI file:booleanInformation provided by the PKI file:Information provided by the PKI file:getFileAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:booleanremoveAllFiles(boolean bCheckPermission) Information provided by the PKI file:booleanremoveFile(String name, boolean bCheckPermission) Information provided by the PKI file:booleanrenameFile(String oldName, String newName, boolean bCheckPermission) Information provided by the PKI file:Methods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.SimFile
getAbsPath, getContent, getName, getParent, getPermission, getSize, isDirectory, isExecutable, isReadable, isWritable, setTextContent
-
Method Details
-
getFileCount
int getFileCount()Information provided by the PKI file:
\brief Returns the number of files in the file system. \return int, the number of files in the file system.- Returns:
- int Returns a int
-
getFileAt
Information provided by the PKI file:
\brief Returns the file at the specified index. \param index, the index of the file of interest. \return SimFile, the SimFile object at the specified index.- Parameters:
index- Takes in a parameter of index- Returns:
- SimFile Returns a SimFile
-
getFile
Information provided by the PKI file:
\brief Returns the file with the specified filename. \param filename, the filename of the file. \return SimFile, the SimFile object with the associated filename.- Parameters:
filename- Takes in a parameter of filename- Returns:
- SimFile Returns a SimFile
-
fileExist
Information provided by the PKI file:
\brief Returns if a file exist in the file system \param name, file name \return bool, true if exists and false if not- Parameters:
name- Takes in a parameter of name- Returns:
- boolean Returns a boolean
-
getSpaceUsed
int getSpaceUsed()Information provided by the PKI file:
\brief Returns the amount of space used on this file system. \return int, the amount of space used on this file system.- Returns:
- int Returns a int
-
addTextFile
Information provided by the PKI file:
\brief Add text file into filesystem \param name, SimFile name \param content, file content \param bCheckPermission, true if write permission needs to be checked and false if otherwise \return bool, true if the file was added successfully and false if not- Parameters:
name- Takes in a parameter of namecontent- Takes in a parameter of contentbCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-
addDirectory
Information provided by the PKI file:
\brief Add directory into filesystem \param name, Directory name \param bCheckPermission, true if write permission needs to be checked and false if otherwise \return bool, true if the file was added successfully and false if not- Parameters:
name- Takes in a parameter of namebCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-
addHttpPage
Information provided by the PKI file:
\brief Returns true if the HTTP page was added successfully, false otherwise. \param name, the name of the HTTP page. \param content, the content of the HTTP page. \param bCheckPermission, true to check permissions, false to skip. \return bool, true if the HTTP page was added successfully, false otherwise.- Parameters:
name- Takes in a parameter of namecontent- Takes in a parameter of contentbCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-
removeFile
Information provided by the PKI file:
\brief Returns true if the file was removed successfully, false otherwise. \param name, the name of the file of interest. \param bCheckPermission, true to check permissions, false to skip. \return bool, true if the file was removed successfully, false otherwise.- Parameters:
name- Takes in a parameter of namebCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-
removeAllFiles
boolean removeAllFiles(boolean bCheckPermission) Information provided by the PKI file:
\brief Returns true if all files were removed successfully, false otherwise. \param bCheckPermission, true to check permissions, false to skip. \return bool, true if all files were removed successfully, false otherwise.- Parameters:
bCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-
renameFile
Information provided by the PKI file:
\brief Returns true if the file was renamed successfully, false otherwise. \param oldName, the old file name \param newName, the new file name. \param bCheckPermission, true to check permissions, false to skip. \return bool, true if the file was renamed successfully, false otherwise.- Parameters:
oldName- Takes in a parameter of oldNamenewName- Takes in a parameter of newNamebCheckPermission- Takes in a parameter of bCheckPermission- Returns:
- boolean Returns a boolean
-